{
  "$schema" : "http://json-schema.org/draft/2019-09/schema#",
  "title" : "Managed Numbers Response",
  "type" : "object",
  "additionalProperties" : false,
  "properties" : {
    "interfaceCategory" : {
      "type" : "string",
      "enum" : [ "Number Management" ],
      "description" : "CMP categorisation of the job associated with this file"
    },
    "interfaceType" : {
      "type" : "string",
      "enum" : [ "Managed Numbers" ],
      "description" : "Sub-categorisation of the job"
    },
    "version" : {
      "type" : "number",
      "minimum" : 0.0,
      "maximum" : 99.99,
      "description" : "The current version of the generic extract file. This must match the corresponding outbound file."
    },
    "transformDateTime" : {
      "type" : "string",
      "format" : "date-time",
      "description" : "Indicates when a third-party file was transformed into the format required by CMP"
    },
    "transmitDateTime" : {
      "type" : "string",
      "format" : "date-time",
      "description" : "Indicates when a file was sent to or received from a third-party system"
    },
    "networkCode" : {
      "type" : "string",
      "maxLength" : 6,
      "description" : "CMP Network numbers are to be loaded to"
    },
    "networkType" : {
      "type" : "string",
      "maxLength" : 6,
      "description" : "Sub-categorisation of CMP Network"
    },
    "id" : {
      "type" : "integer",
      "minimum" : 1,
      "maximum" : 5,
      "description" : "Indicates Serial Number Id that is being loaded"
    },
    "details" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Detail"
      },
      "description" : "A response consists of one or more details"
    },
    "externalFileName" : {
      "type" : "string",
      "pattern" : "^([a-zA-Z0-9._-])+$",
      "maxLength" : 100,
      "description" : "Third party file name"
    },
    "networkOperator" : {
      "type" : "string",
      "maxLength" : 6,
      "description" : "Indicates operator of the network from the external system"
    }
  },
  "required" : [ "interfaceCategory", "interfaceType", "version", "networkCode", "networkType", "id", "externalFileName", "networkOperator" ],
  "definitions" : {
    "Detail" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "detailSequence" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 999999999,
          "description" : "Unique identifier of the detail record within the file"
        },
        "fromSerialNumber" : {
          "type" : "string",
          "maxLength" : 25,
          "description" : "Serial number to load. This can be an individual number or the starting number of a range"
        },
        "count" : {
          "type" : "integer",
          "description" : "Number of serial numbers to load from initial serial number"
        },
        "account" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 99999999,
          "description" : "Account that serial number(s) are to be assigned to"
        },
        "price" : {
          "type" : "number",
          "minimum" : 0.0,
          "maximum" : 9.9999999999E8,
          "description" : "Monetary value to be assigned to serial number or serial number range"
        },
        "serviceCode" : {
          "type" : "string",
          "maxLength" : 6,
          "description" : "Service code associated with the serial number"
        },
        "useByDate" : {
          "type" : "string",
          "format" : "date-time",
          "description" : "Represents date by which this number has to be assigned to a customer"
        },
        "reUseByDate" : {
          "type" : "string",
          "format" : "date-time",
          "description" : "Represents date by which number can be re-used by another customer"
        },
        "expiryDate" : {
          "type" : "string",
          "format" : "date-time",
          "description" : "Represents date by which this number is no longer available for assignment to a customer"
        }
      },
      "required" : [ "detailSequence", "fromSerialNumber" ]
    }
  }
}